package di.annotation;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Required;

public class Library {
	private Book book;	
	private Book book2;	

	public Book getBook() {
		return book;
	}
	
    public Book getBook2() {
		return book2;
	}
	public void setBook(Book book) {
		this.book = book;
	}

	@Required
    @Autowired    
	public void setBook(@Qualifier(value="b2")Book book,@Qualifier(value="b1")Book book2) {
		this.book = book;
		this.book2 = book2;
	}

	@Override
	public String toString() {
		return "Library [book=" + book + ", book2=" + book2 + "]";
	}

	
	
	
	
	

}
